from flask import Flask, render_template
from werkzeug.routing import BaseConverter

app = Flask(__name__)

class RegexConverter(BaseConverter):
    def __init__(self, url_map, regex):
        super(RegexConverter, self).__init__(url_map)
        self.regex = regex

    def to_python(self, value):
        print("to_python方法被调用了")
        return super().to_python(value)
@app.route("/user/<int:idid>")
def user(idid):
    if idid == 1:
        return "python"
    if idid == "2":
        return "java"

    return "hello worl1111d"


if __name__ == "__main__":
    app.run(debug=True)
    

    